# your_project/celery.py
from __future__ import absolute_import, unicode_literals
import os
from celery import Celery
# from app1.tasks import process_video

# 设置 Django 的默认 settings 模块
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'bishe_project.settings')

import django
django.setup()

# 创建 Celery 实例
app = Celery('bishe_project')

# 从 settings.py 加载 Celery 配置
app.config_from_object('django.conf:settings', namespace='CELERY')

# 自动发现任务
app.autodiscover_tasks()